
package com.dotflat.fin.repository;

import com.dotflat.fin.domain.PayRecord;
import com.dotflat.fin.domain.ProductSolutionItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductSolutionItemRepository extends JpaSpecificationExecutor<ProductSolutionItem>, JpaRepository<ProductSolutionItem, String> {

//    PayRecord findFirstByOutTradeNo(String payOrderId);
//
//    List<PayRecord> findAllByPayOrderId(String payOrderId);

    List<ProductSolutionItem> findAllByAreaIdAndSolutionId(String areaId, String solutionId);

    @Modifying
    Integer deleteAllByAreaIdAndSolutionIdAndIdNotIn(String areaId, String solutionId, List<String> ids);

}
